fl.outputPanel.clear();
var currentDoc = fl.getDocumentDOM();
var library = currentDoc.library;

function init(){
	len = library.items.length;
	countUse = 0;
	countNotUse = 0;
	for (var i=0;i<len;i++) 
	{
		if(library.items[i].itemType=='bitmap')
		{
			library.items[i].allowSmoothing = true;
			if (library.items[i].compressionType == "photo") 
			{
				if (library.items[i].useImportedJPEGQuality) countUse++;
				else countNotUse++;
			}
		}
	}
	alert(countUse+' bitmap(s) are toggled to use "document default quality"\n'+countNotUse+' bitmap(s) are toggled to not use "document default quality"');
}

init();